<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style type="text/css">
			.box {
				position: relative;
				width: 74px;
				height: 88px;
				border: 1px solid #ccc;
				margin: 100px auto;
				font-size: 12px;
				text-align: center;
				color: #f40;
				display: block;
			}

			.box img {
				width: 60px;
				margin-top: 5px;
			}

			.close-btn {
				//鼠标光标不同
				cursor: pointer;
				position: absolute;
				border: 1px solid #ccc;
				top: -1px;
				left: -16px;
				width: 14px;
				height: 14px;
				line-height: 14px;
				font-family: Arial, Helvetica, sans-serif;
			}
		</style>
	</head>
	<body>
		<div class="box">
			淘宝二维码
			<img src="./tao.png">
			<div class="close-btn">x</div>
		</div>
		<script type="text/javascript">
			var btn = document.querySelector('.close-btn');
			var box = document.querySelector('.box');
			btn.onclick = function() {
				box.style.display = 'none';
			}
		</script>
	</body>
</html>
